/* 统一的二次元粉色Modal主题样式 */

/* Modal遮罩 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal内容区 */
.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #fff0f5 50%, #f0f8ff 100%);
  border: 3px solid;
  border-image: linear-gradient(135deg, #ff6b9d, #c471ed, #12c2e9) 1;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 50px rgba(255, 107, 157, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 大尺寸Modal */
.modal-lg {
  max-width: 900px;
}

/* 超大尺寸Modal */
.modal-xl {
  max-width: 1200px;
}

/* Modal头部 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #ff6b9d, #c471ed, #12c2e9) 1;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(196, 113, 237, 0.1));
}

.modal-header h2 {
  color: #ff6b9d;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(255, 107, 157, 0.3);
  margin: 0;
}

/* Modal关闭按钮 */
.modal-close {
  background: transparent;
  border: none;
  color: #ff6b9d;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.2);
  color: #c471ed;
  background: rgba(255, 107, 157, 0.1);
}

/* Modal主体 */
.modal-body {
  padding: 25px;
}

/* 表单组 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #ff6b9d;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.form-group label .required {
  color: #ff6b9d;
  margin-left: 4px;
}

/* 输入框样式 */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 240, 245, 0.8);
  border: 2px solid #ffc0cb;
  border-radius: 12px;
  color: #333333;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border: 2px solid #ff6b9d;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
  transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 107, 157, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* 多选下拉框 */
.form-group select[multiple] {
  padding: 12px;
  min-height: 200px;
}

.form-group select option {
  padding: 10px;
  background: #ffffff;
  color: #333333;
  border-radius: 6px;
  margin: 2px 0;
}

.form-group select option:checked {
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  color: #ffffff;
  font-weight: 700;
}

/* 提示文字 */
.text-muted,
.form-hint {
  display: block;
  color: rgba(255, 107, 157, 0.6);
  font-size: 12px;
  margin-top: 6px;
  font-style: italic;
}

/* Modal内的按钮 */
.modal-body .btn,
.modal-footer .btn {
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-body .btn:hover,
.modal-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.6);
  background: linear-gradient(135deg, #ff5a8d, #b361dd);
}

.modal-body .btn:active,
.modal-footer .btn:active {
  transform: translateY(0);
}

/* 取消/危险按钮 */
.modal-body .btn-danger,
.modal-footer .btn-danger {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.modal-body .btn-danger:hover,
.modal-footer .btn-danger:hover {
  background: linear-gradient(135deg, #ff5a8d 0%, #ff7a9b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

/* 次要按钮 */
.modal-body .btn-secondary,
.modal-footer .btn-secondary {
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
  color: #666666;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-body .btn-secondary:hover,
.modal-footer .btn-secondary:hover {
  background: linear-gradient(135deg, #d0d0d0, #e5e5e5);
  color: #333333;
}

/* Modal底部 */
.modal-footer {
  padding: 20px 25px;
  border-top: 2px solid rgba(255, 107, 157, 0.2);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: linear-gradient(135deg, rgba(255, 240, 245, 0.3), rgba(240, 248, 255, 0.3));
}

/* 按钮组 */
.flex.gap-1,
.button-group {
  display: flex;
  gap: 12px;
}

/* 复选框和单选按钮样式 */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  margin-right: 8px;
  accent-color: #ff6b9d;
  cursor: pointer;
}

/* 禁用状态 */
.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(200, 200, 200, 0.3);
}

.modal-body .btn:disabled,
.modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* 错误提示 */
.form-error {
  color: #ff6b9d;
  font-size: 12px;
  margin-top: 6px;
  display: block;
  font-weight: 600;
}

/* 成功提示 */
.form-success {
  color: #4caf50;
  font-size: 12px;
  margin-top: 6px;
  display: block;
  font-weight: 600;
}

/* 滚动条美化 */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255, 192, 203, 0.2);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff5a8d, #b361dd);
}
